home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 34.zip
/
BS1 part 34
/
Weubblers handler.adf
/
examples
/
handler.h
< prev
next >
Wrap
C/C++ Source or Header
|
1988-12-16
|
2KB
|
105 lines
#include <stdio.h>
#include <exec/types.h>
#include <exec/memory.h>
#include <exec/tasks.h>
#include <devices/trackdisk.h>
#include <devices/timer.h>
#include <exec/io.h>
#include <exec/devices.h>
#include <exec/interrupts.h>
#include <exec/ports.h>
#include <libraries/dos.h>
#include <libraries/dosextens.h>
#include <functions.h>
#include <hardware/custom.h>
#include <hardware/adkbits.h>
#include <hardware/cia.h>
#include <hardware/intbits.h>
#include <hardware/dmabits.h>
#include <exec/nodes.h>
#include <exec/lists.h>
#include <exec/libraries.h>
#include <devices/console.h>
#include <libraries/filehandler.h>
#include <intuition/intuitionbase.h>
#define ActionRead 0
#define ActionWrite 1
#define ActionStop 2
#define ActionRawRead 3
#define ActionDie 4
#define ActionStart 5
#define ActionDiskChange 6
#define ActionAcceptDisk 7
#define ActionIdentify 8
#define ActionWriteProtect 9
#define ActionQueryDisk 10
#define ActionSeek 11
#define ActionRawWrite 12
#define ActionSetSync 13
#define ActionMultWrite 14
#define ActionAddHandler 15
#define ActionRemHandler 16
#define ErrorDiskChanged -1
#define ErrorDriveNotValid -2
#define ErrorPortShutdown -3
#define ErrorNoDiskPresent -4
#define ErrorDiskWriteProtected -5
#define ErrorReadError -6
#define ErrorWriteError -7
#define ErrorActionNotKnown -8
#define TypeAmigaDos 0
#define TypeStandardAddress 1
#define TypeStandardData 2
#define TypeNotKnown 3
#define WaitTime 5
#define TrackLen 7000
#define StandardSync 0x4489
#define StandardDataMark 0xfb
#define StandardAddrMark 0xfe
extern long DriveValid[4];
extern long DiskChangeCount[4];
extern WORD SYNC;
extern int ADos;
extern int ExitFlag;
struct MotorMessage
{
struct Message Msg;
long Action;
long Error;
long Drive;
char * Destination;
long Track;
long Head;
long Sector;
long NumSecs;
long UnUsed[5];
};
extern struct MotorMessage *MotorMsg;
extern struct MsgPort *MyPort;
extern struct MsgPort *MotorPort;
extern unsigned short mfm[0x56];
extern unsigned short givemfm[16];
extern char * AllocNormalMem();
extern char * AllocChipMem();
extern char * AllocPublicMem();
extern void DeleteMotorMsg();
extern struct MotorMessage * InitMotorMsg();
extern void dualprint();
extern unsigned short * AmigaSectorDecode();
extern unsigned char MfmDec();
extern void InitMfm();
extern unsigned short StandardMfmEnc();
extern void StandardMfmDecode();
extern void AmigaMfmDecode();
extern int TestDisk();
extern int CalcCrc();